#include <iostream>
using namespace std;

class lw {
private:
    int length;
    int width;
public:
    lw(int length,int width):
    length(length)
    ,width(width)
    {
    cout<<"构造函数"<<endl;
    }
    int perimeter(void){
        return (length+width)*2;
    }
    int area(void){
        return length*width;
    }
};

void test(void){
lw test1(3,2);
int i=test1.perimeter();
int n=test1.area();
cout<<"perimeter"<<i<<endl;
cout<<"area"<<n<<endl;
}


    
int main(int argc, char * argv[]){
    test();
    return 0;
}

